import tkinter as tk
from func.TextEditCore import *

class LayoutSideBar:
    def __init__(self, parent):
        self.parent = parent
        # 注册按钮列表
        self.button_map = {}
        self.button_map['文本编辑器'] = self.__text_edit
        self.button_map['文本编辑器1'] = self.__text_edit
        self.button_map['文本编辑器2'] = self.__text_edit
        self.button_map
        
        yIdx = 0
        for key in self.button_map.keys():
            tk.Button(self.parent, text=key, command=self.button_map[key]).place(y=yIdx,width=width_l)
            yIdx += 30

    def __text_edit(self):
        TextEditCore.Instance.show()
        